package com.egdk.api.mapp;

import com.egdk.api.entity.TabImagesNEntity;
import com.egdk.api.entity.TabImagesNEntityExample;
import com.egdk.api.entity.TabImagesNEntityWithBLOBs;

import java.util.Date;
import java.util.List;

import com.ruoyi.web.controller.api.dto.*;
import org.apache.ibatis.annotations.Param;

public interface TabImagesNEntityMapper {
    long countByExample(TabImagesNEntityExample example);

    int deleteByExample(TabImagesNEntityExample example);

    int deleteByPrimaryKey(Long imageid);

    int insert(TabImagesNEntityWithBLOBs record);

    int insertSelective(TabImagesNEntityWithBLOBs record);

    List<TabImagesNEntityWithBLOBs> selectByExampleWithBLOBs(TabImagesNEntityExample example);

    List<TabImagesNEntity> selectByExample(TabImagesNEntityExample example);

    TabImagesNEntityWithBLOBs selectByPrimaryKey(Long imageid);

    int updateByExampleSelective(@Param("record") TabImagesNEntityWithBLOBs record, @Param("example") TabImagesNEntityExample example);

    int updateByExampleWithBLOBs(@Param("record") TabImagesNEntityWithBLOBs record, @Param("example") TabImagesNEntityExample example);

    int updateByExample(@Param("record") TabImagesNEntity record, @Param("example") TabImagesNEntityExample example);

    int updateByPrimaryKeySelective(TabImagesNEntityWithBLOBs record);

    int updateByPrimaryKeyWithBLOBs(TabImagesNEntityWithBLOBs record);

    int updateByPrimaryKey(TabImagesNEntity record);

    List<TabImagesNEntity> selectByExample2(@Param("im_ptdeid") String im_ptdeid);


    void delImages(@Param("imageRoot1") String imageRoot1, @Param("imagePath") String imagePath, @Param("imageName") String imageName, @Param("imageFormat") String imageFormat);

    // 获取姓名
    String getPatientName(@Param("ptdeid") String ptdeid);

    // 获取检查号
    String getPtdtCheckCode(@Param("ptdeid") String ptdeid);

    // 获取检查日期
    String getPtdtCheckData(@Param("ptdeid") String ptdeid);

    // 获取一级分支总共多少种以及对应的数量
    List<SerialnameAndCountDto> getSerialnameAndCount(@Param("ptdeid") String ptdeid);


    // 获取一级列表内的数据名称
    List<String> getImageName(@Param("ptdeid") String ptdeid, @Param("im_serialname") String im_serialname);

    // 获取单个图像
    TabImagesNEntity selectOneImage(@Param("imageID") String imageID);

    // 获取单个图像
    TabImagesNEntity selectOneImageByname(@Param("im_imName") String im_imName);

    // 根据图像id获取对应的图像描述
    String getImageDescription(@Param("imageID") Long imageID);

    // 根据id以及内容更改对应的图像描述
    void setImageDescription(@Param("imageDescription") String imageDescription, @Param("imageID") Long imageID);

    void deleteImage(@Param("imageID") Long imageID);

    // 根据报告id获取姓名、年龄、性别、检查日期、检查号
    GetWordMessageDto getWordMessage(@Param("ptdeid") String ptdeid);

    int selectCount();

    String selectptdtCheckCode(@Param("ptdeid") String ptdeid);

    void insertImage(@Param("imageID") int imageID, @Param("im_ptdtid") String ptdeid, @Param("im_imName") String tempFileName, @Param("im_serialname") String im_serialname, @Param("ImageDate") String imageDate, @Param("ImageTime") String imageTime, @Param("image_path") String imagePath, @Param("image_name") String fileName, @Param("image_format") String suffix, @Param("image_root") String image_root, @Param("SaveTime") Date date);

    ExamSurveyDto getFollow(@Param("ptdeid") String ptdeid);

    void updateFollow(@Param("sur_ptdeid") String surPtdeid, @Param("follow_tag") String followTag, @Param("follow_result") String followResult);

    void insertFollow(@Param("sur_patient_id") String patientid, @Param("sur_ptdeid") String surPtdeid, @Param("follow_tag") String followTag, @Param("follow_result") String followResult);

    Long getMaxSurveyId();

    WzDataDto getwzdata(@Param("ptdeid") String ptdeid);

    void updatewzdata(@Param("ptdeid") String ptdeid, @Param("ptdt_bgproreadyTxt") String ptdt_bgproreadyTxt, @Param("ptdt_lcdiagnousTxt") String ptdt_lcdiagnousTxt);

    TabPtdetailDto selectTabPtdetailDtoByPtdeid(String ptdeid);


    String getPatientId(@Param("ptdeid") String ptdeid);
}
